package ar.edu.itba.it.cg.grupo01.impl;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.vecmath.Point3f;

import ar.edu.itba.it.cg.grupo01.api.Intersectable;
import ar.edu.itba.it.cg.grupo01.api.Intersection;
import ar.edu.itba.it.cg.grupo01.api.shape.Shape;

public class NormalIntersection implements Intersection<Intersectable> {

	private Set<Point3f> points;

	public NormalIntersection(List<Point3f> points, Intersectable intersectable) {
		this.points = new HashSet<Point3f>(points);
	}

	@Override
	public Point3f closestTo(Point3f origin) {
		throw new UnsupportedOperationException("So sorry");
	}

	@Override
	public float distance(Point3f point) {
		throw new UnsupportedOperationException("So sorry");
	}

	@Override
	public Intersection<? extends Intersectable> getClosestIntersectionTo(
			Point3f point) {
		throw new UnsupportedOperationException("So sorry");
	}

	@Override
	public Set<Point3f> getIntersections() {
		throw new UnsupportedOperationException("So sorry");
	}

	@Override
	public Intersectable getObject() {
		throw new UnsupportedOperationException("So sorry");
	}

	@Override
	public boolean intersects() {
		return !points.isEmpty();
	}

	@Override
	public Intersection.Type getType() {
		throw new UnsupportedOperationException("So sorry");
	}

	@Override
	public void setType(Intersection.Type type) {
		throw new UnsupportedOperationException("So sorry");
	}

	@Override
	public void getDetails(Shape shape, RayTraceInformation info, float delta,
			Details details) {
		throw new UnsupportedOperationException("So sorry");
	}

}
